<!--
 描述: 金字塔动画
 作者: Jack Chen
 日期: 2020-04-19
-->

<template>
    <div class="wrap-container trigle">
        <el-card class="box-card" style="display: inline-block; margin-top: 50px; margin-left: 1%">
            <div slot="header" class="clearfix">
                <span>实时路径规划</span>
            </div>
            <div class="box">
                <video id="videoCamera" class="canvas" :width="videoWidth" :height="videoHeight" autoPlay></video>
                <!--      <canvas id="canvasCamera" class="canvas" :width="videoWidth" :height="videoHeight"></canvas>-->
            </div>
            <!--    <div>-->
            <!--      <el-button @click="photographBtn" icon="el-icon-camera" size="small">拍照</el-button>-->
            <!--      <el-button v-if="os" @click="openCamera" icon="el-icon-video-camera" size="small">打开摄像头</el-button>-->
            <!--      <el-button v-else @click="stopCamera" icon="el-icon-switch-button" size="small">关闭摄像头</el-button>-->
            <!--      <el-button @click="resetBtn" icon="el-icon-refresh" size="small">重置</el-button>-->
            <!--      <el-button @click="submitBtn" icon="el-icon-circle-close" size="small">提交</el-button>-->
            <!--    </div>-->
        </el-card>
        <el-button :plain="true" @click="openSerial">打开串口</el-button>
    </div>
</template>

<script>
export default {
    name: "pyramid",
    data() {
        return {
            testData: '',
            os: false,//控制摄像头开关
            thisVideo: null,
            thisContext: null,
            // thisCancas: null,
            imgSrc: '',
            videoWidth: 600,
            videoHeight: 400,
        };
    },
    mounted() {

        var Color = 'green';
        var chartDom = document.getElementById('main');
        var myChart = echarts.init(chartDom, 'dark');
        var option;

        function randomData() {
            now = new Date(+now + oneDay);
            value = value + Math.random() * 21 - 10;
            return {
                name: now.toString(),
                value: [
                    [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'),
                    Math.round(value)
                ]
            };
        }
        let data = [];
        let now = new Date(1997, 9, 3);
        let oneDay = 24 * 3600 * 1000;
        let value = Math.random() * 1000;
        for (var i = 0; i < 1000; i++) {
            data.push(randomData());
        }
        option = {


            animation: false,
            // grid: {
            //   top: 0,
            //   bottom: '10%',
            //   left: '12%',
            //   right: '6%'
            // },

            xAxis: {
                type: "category",
                boundaryGap: false,
                axisTick: {
                    show: false,
                },
                axisLabel: {
                    show: false,
                    formatter(val) {
                        return val.substr(11, 5);
                    },
                },
                data: this.hrtime
            },
            yAxis: [{
                type: 'value',
                max: 140,
                axisLine: {
                    show: true,
                },
                splitNumber: 4,
                splitLine: {
                    show: false
                },
                axisLabel: {
                    show: false
                }
            },
            {
                type: 'value',
                max: 140,
                axisLine: {
                    show: true,
                },
                splitNumber: 4,
                splitLine: {
                    show: false
                },
                axisLabel: {
                    show: false
                }
            }
            ],
            visualMap: {
                show: false,
                dimension: 1,
                pieces: [{
                    gte: 5,
                    lte: 950,
                    color: "#0BD2C8",
                },
                {
                    gt: 95,
                    color: "#f97f7f",
                },
                    // {
                    //   lt: 50,
                    //   color: "#f97f7f",
                    // },
                ],
            },
            series: [{
                type: "line",
                symbol: "none",
                markLine: {
                    symbol: 'none',
                    emphasis: {
                        disabled: true
                    },
                    data: [{
                        silent: false,
                        lineStyle: {
                            type: 'dashed',
                            color: '#7d888b',
                            opacity: 0.5
                        },
                        label: {
                            show: false
                        },
                        yAxis: 140
                    },
                    {
                        silent: false,
                        lineStyle: {
                            type: 'dashed',
                            color: '#7d888b',
                            opacity: 0.5
                        },
                        label: {
                            show: false
                        },
                        yAxis: 95.1
                    },
                    {
                        silent: false,
                        lineStyle: {
                            type: 'dashed',
                            color: '#7d888b',
                            opacity: 0.5
                        },
                        label: {
                            show: false
                        },
                        yAxis: 50
                    }
                    ]
                },
                data: this.hrdata,
                markArea: {
                    itemStyle: {
                        color: "#003b41",
                    },
                    data: [
                        [{
                            yAxis: 50,
                        },
                        {
                            yAxis: 95,
                        },
                        ],
                    ],
                },
            },],


            tooltip: {
                trigger: 'axis',
                formatter: function (params) {
                    params = params[0];
                    var date = new Date(params.name);
                    return (
                        date.getDate() +
                        '/' +
                        (date.getMonth() + 1) +
                        '/' +
                        date.getFullYear() +
                        ' : ' +
                        params.value[1]
                    );
                },
                axisPointer: {
                    animation: false
                }
            },
            xAxis: {
                type: 'time',
                splitLine: {
                    show: false
                }
            },
            yAxis: {
                type: 'value',
                boundaryGap: [0, '100%'],
                splitLine: {
                    show: true
                }
            },
            series: [
                {
                    name: 'Fake Data',
                    type: 'line',
                    showSymbol: false,
                    data: data,
                    color: Color
                }
            ]
        };
        setInterval(function () {

            for (var i = 0; i < 5; i++) {
                data.shift();
                data.push(randomData());
                // var tempData =lastData.value[1]
                // console.log(tempData)
                // console.log(Color)
                // if (tempData >1000)
                // {Color = 'red';}
                // else {Color = 'green';}



            }
            myChart.setOption({
                series: [
                    {
                        // color:Color,
                        data: data
                    }
                ]
            });
        }, 1000);

        option && myChart.setOption(option);


    },
    methods: {
        submitBtn() {
            console.log(this.imgSrc);
        },
        // 调用摄像头权限
        openCamera() {
            //必须在model中render后才可获取到dom节点,直接获取无法获取到model中的dom节点
            this.$nextTick(() => {
                const _this = this;
                this.os = false;//切换成关闭摄像头
                // this.thisCancas = document.getElementById('canvasCamera');
                // this.thisContext = this.thisCancas.getContext('2d');
                this.thisVideo = document.getElementById('videoCamera');
                // 旧版本浏览器可能根本不支持mediaDevices，我们首先设置一个空对象
                if (navigator.mediaDevices === undefined) {
                    navigator.mediaDevices = {}
                }
                // 一些浏览器实现了部分mediaDevices，我们不能只分配一个对象
                // 使用getUserMedia，因为它会覆盖现有的属性。
                // 这里，如果缺少getUserMedia属性，就添加它。
                if (navigator.mediaDevices.getUserMedia === undefined) {
                    navigator.mediaDevices.getUserMedia = function (constraints) {
                        // 首先获取现存的getUserMedia(如果存在)
                        let getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.getUserMedia;
                        // 有些浏览器不支持，会返回错误信息
                        // 保持接口一致
                        if (!getUserMedia) {
                            return Promise.reject(new Error('getUserMedia is not implemented in this browser'))
                        }
                        // 否则，使用Promise将调用包装到旧的navigator.getUserMedia
                        return new Promise(function (resolve, reject) {
                            getUserMedia.call(navigator, constraints, resolve, reject)
                        })
                    }
                }
                const constraints = {
                    audio: false,
                    video: { width: _this.videoWidth, height: _this.videoHeight, transform: 'scaleX(-1)' }
                };
                navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
                    // 旧的浏览器可能没有srcObject
                    if ('srcObject' in _this.thisVideo) {
                        _this.thisVideo.srcObject = stream
                    } else {
                        // 避免在新的浏览器中使用它，因为它正在被弃用。
                        _this.thisVideo.src = window.URL.createObjectURL(stream)
                    }
                    _this.thisVideo.onloadedmetadata = function (e) {
                        _this.thisVideo.play()
                    }
                }).catch(err => {
                    this.$message({
                        message: '没有开启摄像头权限或浏览器版本不兼容',
                        type: 'warning'
                    });
                });
            });
        },
        //拍照按钮
        photographBtn() {
            // 点击，canvas画图
            this.thisContext.drawImage(this.thisVideo, 0, 0, this.videoWidth, this.videoHeight);
            // 获取图片base64链接
            // this.imgSrc = this.thisCancas.toDataURL('image/png');
        },
        //清空画布
        clearCanvas(id) {
            let c = document.getElementById(id);
            let cxt = c.getContext("2d");
            cxt.clearRect(0, 0, c.width, c.height);
        },
        //重置画布
        resetBtn() {
            this.imgSrc = "";
            this.clearCanvas('canvasCamera');
        },
        //关闭摄像头
        stopCamera() {
            if (this.thisVideo && this.thisVideo !== null) {
                this.thisVideo.srcObject.getTracks()[0].stop();
                this.os = true;//切换成打开摄像头
            }
        },

        // 打开串口，并且传输数据
        async openSerial() {
            console.log("-----------------------------------------------------------------")



            const port = await navigator.serial.requestPort();
            await port.open({ baudRate: 115200 }); // set baud rate
            const keepReading = true;
            const reader = port.readable.getReader();
            // const writer = port.writable.getWriter();
            // set how to write to device internally
            // const writeInt = setInterval(async () => {
            //   const commandframe = new Uint8Array([
            //     0x00,
            //     0xff /*...some bytes to be sent*/,
            //   ]);
            //   await writer.write(commandframe);
            // }, 3000); // send a frame every 3000ms
            let receivedData = '';
            while (port.readable && keepReading) {
                try {
                    while (true) {
                        const { value, done } = await reader.read('\n');
                        if (done) {
                            // Allow the serial port to be closed later.
                            reader.releaseLock();
                            // Allow the serial port to be closed later.
                            // writer.releaseLock();
                            break;
                        }

                        if (value) {


                            const str = String.fromCharCode(...value);
                            receivedData += str;

                            let index = receivedData.indexOf('\n');
                            if (index !== -1) {
                                console.log(receivedData.substring(0, index)); // 最新获取的数据
                                this.testData = receivedData.substring(0, index)
                                receivedData = receivedData.substring(index + 1);
                                console.log("输入一条获取的数据")
                            }


                        }
                    }
                } catch (error) {
                    // Handle non-fatal read error.
                    console.error(error);
                } finally {
                    console.log(port.readable, keepReading);
                }
            }
            // clearInterval(writeInt);
            await port.close();
            console.log("port closed");

            console.log("-----------------------------------------------------------------")
        },
    },
    beforeDestroy() {

    },
    watch: {
        testData: function () {
            this.$notify.info({
                title: '消息',
                message: this.testData
            });
        }
    },
    created() {
        this.openCamera();
    },
};
</script>

<style lang="scss" scoped>
.trigle {
    left: 600px;
    top: 150px;
    width: 720px;
    height: 500px;

    .back_img {
        position: absolute;
        top: 195px;
        width: 100%;
        height: 300px;
        background: url(../../assets/img/chart2/icon_db02.png) no-repeat center;
        transform: rotateX(0deg);
        background-size: 80% 84%;
    }

    .back_img1 {
        position: absolute;
        left: 0;
        top: 18%;
        width: 100%;
        height: 100%;
        background: url(../../assets/img/chart2/icon_db03.png) no-repeat center;
        transform: rotateX(65deg);
        background-size: 62%;
        animation: trigle_move 10s linear infinite;
        -webkit-animation: trigle_move 10s linear infinite;
    }

    .back_img2 {
        position: absolute;
        top: 190px;
        width: 100%;
        height: 300px;
        background: url(../../assets/img/chart2/icon_db04.png) no-repeat center;
        transform: rotateX(66deg);
        background-size: 39%;
        animation: trigle_move1 10s linear infinite;
        -webkit-animation: trigle_move1 10s linear infinite;
    }

    .back_img3 {
        position: absolute;
        top: 247px;
        width: 100%;
        height: 300px;
        background: url(../../assets/img/chart2/icon_db01.png) no-repeat center;
        transform: rotateX(50deg);
        background-size: 65% 100%;
    }

    .first {
        list-style-type: none;
        left: 240px;
        top: 100px;
        width: 240px;
        height: 240px;
        position: absolute;
        transform-style: preserve-3d;
        transform: rotateX(70deg) rotateZ(45deg);
        perspective: 2000px;
        perspective-origin: 50% 100%;
        animation: trigle_down1 1s linear;
        -webkit-animation: trigle_down1 1s linear;

        li {
            width: 100%;
            height: 100%;
            line-height: 200px;
            position: absolute;
            background-image: linear-gradient(#45fed4 1%, rgba(0, 96, 220, 1));
            opacity: 0.8;

            &:nth-child(1) {
                transform: rotateX(0deg) translateZ(-35px) scale(0.79);
            }

            &:nth-child(2) {
                transform: translateZ(-100px) translateY(170px) rotateX(-70deg);
                height: 70px;
                line-height: 70px;
                transform-origin: 0 100%;
                clip-path: polygon(25px 0%, calc(100% - 25px) 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(3) {
                transform: rotateX(-180deg) translateZ(100px);
            }

            &:nth-child(4) {
                height: 70px;
                line-height: 70px;
                transform-origin: 0 100%;
                transform: translateZ(-100px) translateY(-70px) rotateX(-110deg);
                clip-path: polygon(25px 0%, calc(100% - 25px) 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(5) {
                width: 70px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(-70px) rotateY(110deg);
                clip-path: polygon(0% 25px, 100% 0%, 100% 100%, 0% calc(100% - 25px));
            }

            &:nth-child(6) {
                width: 70px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(170px) rotateY(70deg);
                clip-path: polygon(0% 25px, 100% 0%, 100% 100%, 0% calc(100% - 25px));
                background-image: linear-gradient(to left, rgba(0, 96, 220, 1), #45fed4);
            }
        }
    }

    .second {
        list-style-type: none;
        left: 261px;
        top: 65px;
        width: 200px;
        height: 195px;
        text-align: center;
        position: absolute;
        transform-style: preserve-3d;
        transform: rotateX(70deg) rotateZ(45deg);
        perspective: 2000px;
        perspective-origin: 50% 100%;
        animation: trigle_down2 2s linear;
        -webkit-animation: trigle_down2 2s linear;

        li {
            width: 100%;
            height: 100%;
            position: absolute;
            background-image: linear-gradient(rgba(58, 200, 255, 0.8) 25%, #616cff);
            opacity: 0.8;

            &:nth-child(1) {
                transform: rotateX(0deg) translateZ(-48px) scale(0.8);
            }

            &:nth-child(2) {
                transform: translateZ(-100px) translateY(140px) rotateX(-70deg);
                height: 55px;
                line-height: 55px;
                transform-origin: 0 100%;
                clip-path: polygon(18px 0%, calc(100% - 18px) 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(3) {
                transform: rotateX(-180deg) translateZ(100px);
            }

            &:nth-child(4) {
                height: 55px;
                line-height: 55px;
                transform-origin: 0 100%;
                transform: translateZ(-100px) translateY(-55px) rotateX(-110deg);
                clip-path: polygon(18px 0%, calc(100% - 18px) 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(5) {
                width: 55px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(-55px) rotateY(110deg);
                clip-path: polygon(0% 18px, 100% 0%, 100% 100%, 0% calc(100% - 18px));
            }

            &:nth-child(6) {
                width: 55px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(145px) rotateY(70deg);
                clip-path: polygon(0% 18px, 100% 0%, 100% 100%, 0% calc(100% - 18px));
            }
        }
    }

    .third {
        list-style-type: none;
        left: 292px;
        top: 20px;
        width: 140px;
        height: 140px;
        text-align: center;
        position: absolute;
        transform-style: preserve-3d;
        transform: rotateX(70deg) rotateZ(45deg);
        perspective: 2000px;
        perspective-origin: 50% 100%;
        animation: trigle_down3 3s linear;
        -webkit-animation: trigle_down3 3s linear;

        li {
            width: 100%;
            height: 100%;
            position: absolute;
            background-image: linear-gradient(#f1e04f 5%, rgba(253, 156, 48, 0.8));
            opacity: 0.7;

            &:nth-child(1) {
                transform: rotateX(0deg) translateZ(-48px) scale(0.75);
            }

            &:nth-child(2) {
                transform: translateZ(-100px) translateY(85px) rotateX(-70deg);
                height: 55px;
                line-height: 55px;
                transform-origin: 0 100%;
                clip-path: polygon(18px 0%, calc(100% - 18px) 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(3) {
                transform: rotateX(-180deg) translateZ(100px);
            }

            &:nth-child(4) {
                height: 55px;
                line-height: 55px;
                transform-origin: 0 100%;
                transform: translateZ(-100px) translateY(-55px) rotateX(-110deg);
                clip-path: polygon(18px 0%, calc(100% - 18px) 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(5) {
                width: 55px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(-55px) rotateY(110deg);
                clip-path: polygon(0% 18px, 100% 0%, 100% 100%, 0% calc(100% - 18px));
            }

            &:nth-child(6) {
                width: 55px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(85px) rotateY(70deg);
                clip-path: polygon(0% 18px, 100% 0%, 100% 100%, 0% calc(100% - 18px));
            }
        }
    }

    .four {
        list-style-type: none;
        left: 310px;
        top: -8px;
        width: 105px;
        height: 106px;
        text-align: center;
        position: absolute;
        transform-style: preserve-3d;
        transform: rotateX(70deg) rotateZ(45deg);
        perspective: 2000px;
        perspective-origin: 50% 100%;
        animation: trigle_down4 4s linear;
        -webkit-animation: trigle_down4 4s linear;

        li {
            width: 100%;
            height: 100%;
            position: absolute;
            background-image: linear-gradient(rgba(112, 245, 100, 0.8) 9%, #dbfe73);
            opacity: 0.7;

            &:nth-child(1) {
                display: none;
                transform: rotateX(0deg) translateZ(-48px) scale(0.75);
            }

            &:nth-child(2) {
                transform: translateZ(-100px) translateY(-48px) rotateX(-70deg);
                height: 152px;
                transform-origin: 0 100%;
                clip-path: polygon(50% 0%, 50% 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(3) {
                transform: rotateX(-180deg) translateZ(100px);
            }

            &:nth-child(4) {
                height: 150px;
                transform-origin: 0 100%;
                transform: translateZ(-100px) translateY(-150px) rotateX(-110deg);
                clip-path: polygon(50% 0%, 50% 0%, 100% 100%, 0% 100%);
            }

            &:nth-child(5) {
                width: 150px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(-150px) rotateY(110deg);
                clip-path: polygon(0% 50%, 100% 0%, 100% 100%, 0% 50%);
            }

            &:nth-child(6) {
                width: 152px;
                transform-origin: 100% 100%;
                transform: translateZ(-100px) translateX(-48px) rotateY(70deg);
                clip-path: polygon(0% 50%, 100% 0%, 100% 100%, 0% 50%);
            }
        }
    }

    .detail {
        width: 240px;
        height: 60px;
        position: absolute;

        &.detail_1 {
            left: 2px;
            top: 245px;
        }

        &.detail_2 {
            left: 430px;
            top: 194px;
            width: 290px;
        }

        &.detail_3 {
            left: 67px;
            top: 117px;
        }

        &.detail_4 {
            left: 379px;
            top: 60px;
        }

        .detail_txt {
            display: inline-block;
            width: calc(100% - 80px);
            height: 100%;

            .txt_right {
                padding: 10px 0;
                display: inline-block;
                float: right;
                height: 60px;
                width: calc(100% - 65px);

                %arrow_icon {
                    content: '';
                    width: 12px;
                    height: 18px;
                    display: block;
                    float: right;
                }

                .f_div {
                    color: #84a9ef;
                    font-size: 16px;

                    &.aharrow_down {
                        &:before {
                            @extend %arrow_icon;
                            background: url(../../assets/img/chart2/icon_jt01.png) no-repeat center;
                        }
                    }

                    &.aharrow_up {
                        &:before {
                            @extend %arrow_icon;
                            background: url(../../assets/img/chart2/icon_jt02.png) no-repeat center;
                        }
                    }
                }

                .s_div {
                    font-size: 16px;
                    font-weight: bold;
                }

                .s_div1 {
                    color: #01ddb2;
                }

                .s_div2 {
                    color: #5d83ff;
                }

                .s_div3 {
                    color: #e59138;
                }

                .s_div4 {
                    color: #77f364;
                }
            }

            &.detail_txt1 {
                animation: opacity_path 3s linear;
                -webkit-animation: opacity_path 3s linear;
            }

            &.detail_txt2 {
                animation: opacity_path2 4s linear;
                -webkit-animation: opacity_path2 4s linear;
                float: right;
            }

            &.detail_txt3 {
                animation: opacity_path3 5s linear;
                -webkit-animation: opacity_path3 5s linear;
            }

            &.detail_txt4 {
                animation: opacity_path4 6s linear;
                -webkit-animation: opacity_path4 6s linear;
                float: right;
            }

            .precent_txt {
                width: 50px;
                height: 50px;
                display: inline-block;
                border-radius: 50%;
                margin: 5px;

                &.precent_txt1 {
                    background: url(../../assets/img/chart2/icon_xfq04.png) no-repeat center;
                }

                &.precent_txt2 {
                    background: url(../../assets/img/chart2/icon_xfq03.png) no-repeat center;
                }

                &.precent_txt3 {
                    background: url(../../assets/img/chart2/icon_xfq01.png) no-repeat center;
                }

                &.precent_txt4 {
                    background: url(../../assets/img/chart2/icon_xfq02.png) no-repeat center;
                }
            }
        }
    }

    .chartsdom {
        width: 100%;
        height: 100%;
    }

    .arrow_contain {
        width: 80px;
        height: 100%;
        display: inline-block;

        &.arrow_contain1 {
            animation: clip_line 2s linear;
            -webkit-animation: clip_line 2s linear;
            float: right;
        }

        &.arrow_contain2 {
            animation: clip_line2 3s linear;
            -webkit-animation: clip_line2 3s linear;
            float: left;
        }

        &.arrow_contain3 {
            animation: clip_line3 4s linear;
            -webkit-animation: clip_line3 4s linear;
            float: right;
        }

        &.arrow_contain4 {
            animation: clip_line4 5s linear;
            -webkit-animation: clip_line4 5s linear;
            float: left;
        }

        .arrow {
            &.arrow_1 {
                width: 20px;
                height: 1px;
                background: #01ddb2;
                transform: rotate(30deg);
                display: inline-block;
                margin-top: 40px;

                &:before {
                    content: '';
                    width: 50px;
                    height: 1px;
                    background: #01ddb2;
                    display: inline-block;
                    transform: rotate(-30deg);
                    position: absolute;
                    left: 17px;
                    top: -13px;
                }

                &:after {
                    content: '';
                    width: 5px;
                    height: 5px;
                    background: #01ddb2;
                    display: inline-block;
                    border-radius: 50%;
                    position: absolute;
                    top: -2px;
                    box-shadow: 0px 0px 5px 1px #01ddb2;
                    left: -2px;
                }
            }

            &.arrow_2 {
                width: 20px;
                height: 1px;
                background: #84a9ef;
                transform: rotate(-30deg);
                display: inline-block;
                margin-top: 40px;
                float: right;

                &:before {
                    content: '';
                    width: 50px;
                    height: 1px;
                    background: #84a9ef;
                    display: inline-block;
                    transform: rotate(30deg);
                    position: absolute;
                    left: -47px;
                    top: -13px;
                }

                &:after {
                    content: '';
                    width: 5px;
                    height: 5px;
                    background: #84a9ef;
                    display: inline-block;
                    border-radius: 50%;
                    position: absolute;
                    top: -2px;
                    box-shadow: 0px 0px 5px 1px #84a9ef;
                    left: 17px;
                }
            }

            &.arrow_3 {
                width: 20px;
                height: 1px;
                background: #ff9232;
                transform: rotate(30deg);
                display: inline-block;
                margin-top: 40px;

                &:before {
                    content: '';
                    width: 50px;
                    height: 1px;
                    background: #ff9232;
                    display: inline-block;
                    transform: rotate(-30deg);
                    position: absolute;
                    left: 17px;
                    top: -13px;
                }

                &:after {
                    content: '';
                    width: 5px;
                    height: 5px;
                    background: #ff9232;
                    display: inline-block;
                    border-radius: 50%;
                    position: absolute;
                    top: -2px;
                    box-shadow: 0px 0px 5px 1px #ff9232;
                    left: -2px;
                }
            }

            &.arrow_4 {
                width: 20px;
                height: 1px;
                background: #77f364;
                transform: rotate(-30deg);
                display: inline-block;
                margin-top: 40px;
                float: right;

                &:before {
                    content: '';
                    width: 50px;
                    height: 1px;
                    background: #77f364;
                    display: inline-block;
                    transform: rotate(30deg);
                    position: absolute;
                    left: -47px;
                    top: -13px;
                }

                &:after {
                    content: '';
                    width: 5px;
                    height: 5px;
                    background: #77f364;
                    display: inline-block;
                    border-radius: 50%;
                    position: absolute;
                    top: -2px;
                    box-shadow: 0px 0px 5px 1px #77f364;
                    left: 17px;
                }
            }

        }
    }


}


@keyframes clip_line {
    0% {
        clip-path: polygon(100% 0, 100% 0%, 100% 0, 100% 0);
    }

    50% {
        clip-path: polygon(100% 0, 100% 0%, 100% 0, 100% 0);
    }

    75% {
        clip-path: polygon(50% 0, 100% 0%, 100% 100%, 50% 100%);
    }

    100% {
        clip-path: polygon(0% 0, 100% 0%, 100% 100%, 0% 100%);
    }
}

@keyframes clip_line2 {
    0% {
        clip-path: polygon(0% 0, 0% 0%, 0% 0, 0% 0);
    }

    66.66% {
        clip-path: polygon(0% 0, 0% 0%, 0% 0, 0% 0);
    }

    83% {
        clip-path: polygon(0% 0, 50% 0%, 50% 50%, 0% 50%);
    }

    100% {
        clip-path: polygon(0% 0, 100% 0%, 100% 100%, 0% 100%);
    }
}

@keyframes clip_line3 {
    0% {
        clip-path: polygon(100% 0, 100% 0%, 100% 0, 100% 0);
    }

    75% {
        clip-path: polygon(100% 0, 100% 0%, 100% 0, 100% 0);
    }

    93% {
        clip-path: polygon(50% 0, 100% 0%, 100% 100%, 50% 100%);
    }

    100% {
        clip-path: polygon(0% 0, 100% 0%, 100% 100%, 0% 100%);
    }
}

@keyframes clip_line4 {
    0% {
        clip-path: polygon(0% 0, 0% 0%, 0% 0, 0% 0);
    }

    70% {
        clip-path: polygon(0% 0, 0% 0%, 0% 0, 0% 0);
    }

    85% {
        clip-path: polygon(0% 0, 50% 0%, 50% 50%, 0% 50%);
    }

    100% {
        clip-path: polygon(0% 0, 100% 0%, 100% 100%, 0% 100%);
    }
}

@keyframes opacity_path {
    0% {
        opacity: 0;
    }

    66.7% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes opacity_path2 {
    0% {
        opacity: 0;
    }

    75% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes opacity_path3 {
    0% {
        opacity: 0;
    }

    80% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes opacity_path4 {
    0% {
        opacity: 0;
    }

    83.33% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes trigle_down1 {
    0% {
        top: -250px;
    }

    100% {
        top: 80px;
    }
}

@keyframes trigle_down2 {
    0% {
        top: -300px;
    }

    50% {
        top: -300px;
    }

    100% {
        top: 45px
    }
}

@keyframes trigle_down3 {
    0% {
        top: -250px;
    }

    66.66% {
        top: -250px;
    }

    100% {
        top: 0;
    }
}

@keyframes trigle_down4 {
    0% {
        top: -250px;
    }

    75% {
        top: -250px;
    }

    100% {
        top: -28px;
    }
}

@keyframes trigle_move {
    0% {
        transform: rotateX(65deg) rotateZ(360deg);
    }

    100% {
        transform: rotateX(65deg) rotateZ(0deg);
    }
}

@keyframes trigle_move1 {
    0% {
        transform: rotateX(66deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(66deg) rotateZ(360deg);
    }
}
</style>
